package com.example.text.app

import android.app.Application
import com.alibaba.android.arouter.launcher.ARouter
import com.example.text.mmkv.AppMMKV
import com.example.text.mmkv.AuthMMKV
import com.example.text.mmkv.UserMMKV
import com.example.text.ui.login.model.UserInfo
import com.tencent.mmkv.MMKV
import dagger.hilt.android.HiltAndroidApp

@HiltAndroidApp
class App: Application() {

    companion object {
        private lateinit var app: App
        fun getAppContext(): App {
            return app
        }
    }

    override fun onCreate() {
        super.onCreate()
        app = this

        MMKV.initialize(this)

        AppMMKV.needGuide = false
        UserMMKV.hasBindDevice = true
        AuthMMKV.token = "1234567"
        UserMMKV.userInfo = UserInfo("123","hahah")

        ARouter.init(app)
        ARouter.openLog()

    }
}